<template>
  <div>
    <h1>ChildB</h1>
    <h2>Count:{{ thiscount }}</h2>
    <button @click="add">add</button>
  </div>
</template>
<script setup>
import { inject } from "vue";

const thiscount = inject("mycount");
const add = () => {
    thiscount.value++;
};
</script>
<style></style>
